import request from "@/utils/request";

export function listRiskControl(params) {
  return request({
    url: "/risk-control",
    method: "get",
    params,
  });
}

export function listPageRiskControl(params) {
  return request({
    url: "/risk-control/page",
    method: "get",
    params,
  });
}

export function saveRiskControl(params) {
  return request({
    url: "/risk-control",
    method: "post",
    data: params,
  });
}

export function updateRiskControl(id,params) {
  return request({
    url: `/risk-control/${id}`,
    method: "put",
    data: params,
  });
}

export function deleteRiskControl(id) {
  return request({
    url: `/risk-control/${id}`,
    method: "delete",
  });
}

export function deleteBatchRiskControl(idList) {
  return request({
    url: `/risk-control/batch`,
    method: "delete",
    data: idList,
  });
}

export function getRiskControlById(id) {
  return request({
    url: `/risk-control/${id}`,
    method: "get",
  });
}
